using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XLua;
public class LuaInit : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        LuaEnv luaEnv = new LuaEnv();
        
        // 执行lua代码
        luaEnv.DoString("print('Hello World')");

        // 加载lua文件
        luaEnv.DoString("require 'Main'");

        // 每帧调用
        // 用于执行lua的GC
        luaEnv.Tick();

        // 释放销毁Lua解析器
        luaEnv.Dispose();
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
